package com.east.spark.parttern.command;

/**
 * 顾客--真正的口令发出者
 */
public class Customer {
	private Command command;

	public Customer(Command command) {
		this.command = command;
	}

	/**
	 * 将命令的发出与执行分开
	 */
	public void order() {
		command.execute();
	}

	public void unOrder() {
		command.undo();
	}
}
